package com.fc.entity.input;

import com.fc.checkGroup.Insert;
import com.fc.checkGroup.Select;
import com.fc.checkGroup.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
public class ShoppingCarInput {

    @Schema(title = "id")
    @NotNull(message = "id不能为空", groups = Update.class)
    private Long id;

    @Schema(title = "产品id")
    @NotNull(message = "id不能为空", groups = {Insert.class, Update.class})
    private Long productId;

    @Schema(title = "产品数量")
    @NotNull(message = "id不能为空", groups = {Insert.class, Update.class})
    private Long productNum;

    /**
     * true：产品数量++
     * false：产品数量--
     */
    @Schema(title = "产品数量加减类型")
    @NotNull(message = "产品数量加减类型不能为空", groups = Select.class)
    private Boolean isAdd;
}
